@include('Home.head')
<body>
<style>
    .am-header-default{
        background-color: #CC3436;
    }

</style>
<div class="container" id="app">
    <header data-am-widget="header" class="am-header am-header-default my-header">
        <div class="am-header-left am-header-nav">
            <a  onclick="javascript:history.back(-1);" class="">
                <i class="am-header-icon am-icon-chevron-left"></i>
            </a>
        </div>
        <h1 class="am-header-title">
            <a href="#title-link" class="">个人中心</a>
        </h1>
        <div class="am-header-right am-header-nav">
            <a href="" class="">
                <i class="am-header-icon  am-icon-home"></i>
            </a>
        </div>
    </header>
    <div class="cart-panel">
        <form class="am-form">

            <!-- 预计分红名次：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-home" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.days" style="color: #ff4538">
            </div>
            今日广告补贴总额：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-home" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.money_amount" style="color: #ff4538">
            </div>
            预计今日广告补贴1：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-home" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.achievement_increment" style="color: #ff4538">
            </div>
            预计今日广告补贴2：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-home" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.team_achievement" style="color: #ff4538">
            </div> -->

            <div style="width: 100%;;height: 170px;background-color: rgb(173,61,41);border-radius: 10px;padding: 25px;">
                <div style="color: white;font-size: 16px;margin-bottom: 10px;">预计分红：@{{UserInfo.days}}</div>
                <div style="color: white;font-size: 16px;margin-bottom: 10px;">预计今日广告补贴：@{{UserInfo.bonus}}</div>
                <div style="color: white;font-size: 16px;margin-bottom: 10px;">预计获得消费广告补贴：@{{UserInfo.expect}}</div>
                <div style="color: white;font-size: 16px;margin-bottom: 10px;">已获得消费广告补贴：@{{UserInfo.consumption_bonus}}</div>
{{--                <div style="color: white;font-size: 16px;margin-bottom: 10px;">预计今日消费广告补贴3：@{{UserInfo.single_achievement}}</div>--}}
            </div>
            <br>
            <br>
            <br>
            用户账号(不可修改)：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-user" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" v-if="UserInfo.update_user==2" disabled v-model="UserInfo.name">
                <input type="text" class="am-form-field  my-radius" v-if="UserInfo.update_user==1" v-model="UserInfo.name">
                <input type="text" class="am-form-field  my-radius"  disabled v-model="UserInfo.name">
            </div>
      		   用户名(可修改)：
        			<div class="am-form-group am-form-icon">
      			    <i class="am-icon-user" style="color:#329cd9"></i>
         		    <input type="text" class="am-form-field  my-radius"   v-model="UserInfo.user_name" placeholder="请输入您的姓名">
         			</div>

        		绑定手机号(可修改)：
			<div class="am-form-group am-form-icon">
			   <i class="am-icon-phone" style="color:#f09513"></i>
 			    <input type="number" pattern="\d*" class="am-form-field  my-radius"   v-model="UserInfo.phone" placeholder="请输入联系电话">
    			</div>


            复购等级：
            <div class="am-form-group am-form-icon">
                <i class="am-icon-user" style="color:#329cd9"></i>
                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.repurchase">
            </div>
{{--			<div v-show="UserInfo.partner != null">--}}
{{--			用户身份：--}}
{{--			<div class="am-form-group am-form-icon">--}}
{{--			    <i class="am-icon-user" style="color:#329cd9"></i>--}}
{{--			    <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.partner">--}}
{{--			</div>--}}
{{--			</div>--}}
{{--		 团队业绩：--}}
{{--		<div class="am-form-group am-form-icon">--}}
{{--			    <i class="am-icon-user" style="color:#329cd9"></i>--}}
{{--			    <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.super_team_count">--}}
{{--			</div>--}}
			
{{--			团队等级：--}}
{{--			<div class="am-form-group am-form-icon">--}}
{{--			    <i class="am-icon-user" style="color:#329cd9"></i>--}}
{{--			    <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.level_name">--}}
{{--			</div>--}}
{{--           当月业绩：--}}
{{--            <div class="am-form-group am-form-icon">--}}
{{--                <i class="am-icon-user" style="color:#329cd9"></i>--}}
{{--                <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.achievement">--}}
{{--            </div>--}}
{{--			绑定门店：--}}
{{--			 <div class="am-form-group am-form-icon">--}}
{{--			     <i class="am-icon-home" style="color:#329cd9"></i>--}}
{{--			     <input type="text" class="am-form-field  my-radius" disabled v-model="UserInfo.stores_number">--}}
{{--			 </div>--}}

         <p class="am-text-center"><button type="button" class="am-btn am-btn-danger am-radius am-btn-block" v-on:click="edit(UserInfo.uid)" style="border-radius: 50px;border: none;">立即修改</button></p>
        </form>
    </div>
</div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            UserInfo: {
                uid:'',
                name:'',
                phone:'',
            },
        },
        methods: {
            initialize: function () { //查找资料
                $.post("/home/member/editInfo", {'_token': '{{csrf_token()}}','class':'find'}, function (res) {
                    if (res.code) {
                        app.UserInfo = res.data;
                    } else {
                        layer.msg(res.data);
                    }
                });


            },
           //修改资料
            edit:function(uid){
                $.post("/home/member/editInfo", {'_token': '{{csrf_token()}}','class':'edit',uid:uid,UserInfo:app.UserInfo}, function (res) {
                    if (res.code) {
                        layer.msg(res.data);
                        location.href="/home/member/index"
                    } else {
                        layer.msg(res.data);
                    }
                });
            }
        },
        //自动执行
        mounted: function () {
            this.initialize();
        },
    })
</script>
</html>










